@extends('admin.layout.base')
@section('title', '用户评价列表页')
@section('content')
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            用户评价列表
        </h1>
        <ol class="breadcrumb">
            <li><a href="{{ url('/admin') }}"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">评价管理</li>
        </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header with-border">
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table class="table table-bordered">
                            <tr>
                                <th style="width: 10px">#</th>
                                <th>商品名</th>
                                <th>用户名</th>                             
                                <th>评论时间</th>
                                <th>评论内容</th>
                                <th>商品评分</th>
                                <th>评价状态</th>
                                <th>回复状态</th>
                                <th>操作</th>
                            </tr>
                            @foreach($comments as $comment)
                            <tr>
                                <td>{{ $comment->id }}</td>
                                <td>{{ $comment->goods_name }}</td>
                                <td>{{ $comment->user_name }}</td>
                                <td>{{ $comment->comment_time }}</td>
                                <td>{{ str_limit($comment->comment_content, 50) }}</td>
                                <td>{{ $comment->comment_score }}</td>
                                <td>{{ $comment->comment_status == 1 ? '显示' : '隐藏' }}</td>
                                <td>{{ $comment->reply_time ? '已回复' : '' }}</td>
                                <td>
                                    <a href="{{ url("/admin/comment/{$comment->id}/edit") }}" class="btn btn-info" />编辑</a> 
                                    <a href="{{ url("/admin/comment/delete/{$comment->id}") }}" class="btn btn-info" />删除</a>
                                </td>
                            </tr>
                            @endforeach
                        </table>
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer clearfix">
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
@endsection
@section('pluginscript')
<!-- Slimscroll -->
<script src="{{ asset('/dist/admin/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
<!-- FastClick -->
<script src="{{ asset('/dist/admin/plugins/fastclick/fastclick.js') }}"></script>
<script>
$(function(){
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });
});
</script>
<!--<script src="{{asset("/dist/admin/js/admin_index.js")}}"></script>-->
@endsection




